
		**********************************************************
		** File: ccode_to_name.do								**
		** Paper: Human Trafficking Indicators: A New Dataset	**
		** Author: Richard Frank								**
		** Date: July 11, 2021									**
		** Task: Cleaning country names							**
		**********************************************************

	gen country=""
	
	replace country="Afghanistan" if ccode==700
	replace country="Albania" if ccode==339	 
	replace country="Algeria" if ccode==615	 
	replace country="Andorra " if ccode==232	 
 	replace country="Angola" if ccode==540	 
	replace country="Antigua & Barbuda" if ccode==58	 
	replace country="Argentina" if ccode==160	 	
	replace country="Armenia" if ccode==371	 
	replace country="Australia" if ccode==900	 
	replace country="Austria" if ccode==305	 
	
	replace country="Austria-Hungary" if ccode==300	
	replace country="Azerbaijan" if ccode==373		
	replace country="Baden" if ccode==267	 	
	replace country="Bahamas" if ccode==31	 	
 	replace country="Bahrain" if ccode==692	
	replace country="Bangladesh" if ccode==771	 	
	replace country="Barbados" if ccode==53		
	replace country="Bavaria" if ccode==245	 	
	replace country="Belarus" if ccode==370	 	
	replace country="Belgium" if ccode==211				
	
	replace country="Belize" if ccode==80		
	replace country="Benin" if ccode==434	 
	replace country="Bhutan" if ccode==760		
 	replace country="Bolivia" if ccode==145	
	replace country="Bosnia & Herzegovina"  if ccode==346		
	replace country="Botswana" if ccode==571	 	
	replace country="Brazil" if ccode==140	 	
	replace country="Brunei" if ccode==835		
	replace country="Bulgaria" if ccode==355	 	
	replace country="Burkina Faso" if ccode==439	 		
	
 	replace country="Burundi" if ccode==516	 	
	replace country="Cambodia" if ccode==811	 	
	replace country="Cameroon" if ccode==471		
 	replace country="Canada" if ccode==20	 
	replace country="Cape Verde" if ccode==402	 	
	replace country="Central African Republic"  if ccode==482		
	replace country="Chad" if ccode==483	 	
	replace country="Chile" if ccode==155	 	
	replace country="China" if ccode==710	 	
	replace country="Colombia" if ccode==100		 
 
 	replace country="Comoros" if ccode==581		
	replace country="Congo" if ccode==484	 	
	replace country="Costa Rica" if ccode==94	 	
	replace country="Croatia" if ccode==344	  	
	replace country="Cuba" if ccode==40	  	
	replace country="Cyprus" if ccode==352	  	
	replace country="Czech Republic" if ccode==316	 	
	replace country="Czechoslovakia" if ccode==315		
	replace country="Congo, Dem. Rep." if ccode==490	 	
	replace country="Denmark" if ccode==390	 	  	  

 	replace country="Djibouti" if ccode==522	  	
	replace country="Dominica" if ccode==54	 	
	replace country="Dominican Republic" if ccode==42		
	replace country="East Timor" if ccode==860	 	
	replace country="Ecuador" if ccode==130		
	replace country="Egypt" if ccode==651	 	
	replace country="El Salvador" if ccode==92	 	
	replace country="Equatorial Guinea" if ccode==411	  	
	replace country="Eritrea" if ccode==531		
	replace country="Estonia" if ccode==366	 		
	
 	replace country="Ethiopia" if ccode==530		
	replace country="Micronesia" if ccode==987	 	
	replace country="Fiji" if ccode==950		
	replace country="Finland" if ccode==375	 	
	replace country="France" if ccode==220	 	
	replace country="Gabon" if ccode==481	 	
	replace country="Gambia" if ccode==420	 	
	replace country="Georgia" if ccode==372	  	
	replace country="German Democratic Republic" if ccode==265	 	
	replace country="German Federal Republic" if ccode==260	 	
	
  	replace country="Germany" if ccode==255	 	
	replace country="Ghana" if ccode==452	 	
	replace country="Greece" if ccode==350	 	
	replace country="Grenada" if ccode==55	 	
	replace country="Guatemala" if ccode==90		
	replace country="Guinea" if ccode==438	  	
	replace country="Guinea-Bissau" if ccode==404	 	
	replace country="Guyana" if ccode==110		
	replace country="Haiti" if ccode==41	 	
	replace country="Hanover" if ccode==240		  
  	 
 	replace country="Honduras" if ccode==91		
	replace country="Hungary" if ccode==310		
	replace country="Iceland" if ccode==395	 	
	replace country="India" if ccode==750	 	
	replace country="Indonesia" if ccode==850		
	replace country="Iran" if ccode==630		
	replace country="Iraq" if ccode==645	 	
	replace country="Ireland" if ccode==205		
	replace country="Israel" if ccode==666	 	
	replace country="Italy" if ccode==325		  	  
  
  	replace country="Cote d'Ivoire"	 if ccode==437	
	replace country="Jamaica" if ccode==51	 	
	replace country="Japan" if ccode==740		
	replace country="Jordan" if ccode==663	 	
	replace country="Kazakhstan" if ccode==705	 	
	replace country="Kenya" if ccode==501	 	
	replace country="Kiribati" if ccode==946	 	
	replace country="Korea" if ccode==730	  	
	replace country="Kosovo" if ccode==347	 	
	replace country="Kuwait" if ccode==690		  
  	 
  	replace country="Kyrgyzstan" if ccode==703		
	replace country="Laos" if ccode==812		
	replace country="Latvia" if ccode==367	 	
	replace country="Lebanon" if ccode==660	  	
	replace country="Lesotho" if ccode==570		
	replace country="Liberia" if ccode==450		
	replace country="Libya" if ccode==620	 	
	replace country="Liechtenstein" if ccode==223	 	
	replace country="Lithuania" if ccode==368		
	replace country="Luxembourg" if ccode==212	 	 	  
 
   	replace country="Macedonia" if ccode==343	 	
	replace country="Madagascar" if ccode==580	 	
	replace country="Malawi" if ccode==553		
	replace country="Malaysia" if ccode==820		
	replace country="Maldives" if ccode==781		
	replace country="Mali" if ccode==432	 	
	replace country="Malta" if ccode==338		
	replace country="Marshall Islands" if ccode==983		
	replace country="Mauritania" if ccode==435	  	
	replace country="Mauritius" if ccode==590		 	 
  	 
   	replace country="Mecklenburg Schwerin" if ccode==280	  	
	replace country="Mexico" if ccode==70		
	replace country="Modena" if ccode==332		
	replace country="Moldova" if ccode==359		
	replace country="Monaco" if ccode==221		
	replace country="Mongolia" if ccode==712	 	
	replace country="Montenegro" if ccode==341	 	
	replace country="Morocco" if ccode==600	 	
	replace country="Mozambique" if ccode==541		
	replace country="Myanmar" if ccode==775		 	 
 
    replace country="Namibia" if ccode==565	 	
	replace country="Nauru" if ccode==970	  	
	replace country="Nepal" if ccode==790	 	
	replace country="Netherlands" if ccode==210	 	
	replace country="New Zealand" if ccode==920		
	replace country="Nicaragua" if ccode==93	  	
	replace country="Niger" if ccode==436		
	replace country="Nigeria" if ccode==475	 	
	replace country="North Korea"  if ccode==731		
	replace country="Norway" if ccode==385	 	 	 
  	  
   	replace country="Oman" if ccode==698	 	
	replace country="Pakistan" if ccode==770	 	
	replace country="Palau" if ccode==986	 	
	replace country="Panama" if ccode==95	 	
	replace country="Papal States" if ccode==327	 	
	replace country="Papua New Guinea" if ccode==910	 	
	replace country="Paraguay" if ccode==150		
	replace country="Parma" if ccode==335		
	replace country="Peru" if ccode==135	  	
	replace country="Philippines" if ccode==840		  	 
  	
   	replace country="Poland" if ccode==290	 	
	replace country="Portugal" if ccode==235	
	replace country="Qatar" if ccode==694		
	replace country="Vietnam, Rep." if ccode==817	 	
	replace country="Romania" if ccode==360		
	replace country="Russia" if ccode==365		
	replace country="Rwanda" if ccode==517		
	replace country="Samoa" if ccode==990	  	
	replace country="San Marino" if ccode==331		
	replace country="Sao Tome & Principe" if ccode==403	 	 
 
    replace country="Saudi Arabia" if ccode==670	  
	replace country="Saxony" if ccode==269		
	replace country="Senegal" if ccode==433		
	replace country="Seychelles" if ccode==591		
	replace country="Sierra Leone" if ccode==451	 	
	replace country="Singapore" if ccode==830	 	
	replace country="Slovakia" if ccode==317		
	replace country="Slovenia" if ccode==349	  	
	replace country="Solomon Islands" if ccode==940		
	replace country="Somalia" if ccode==520	  	
 
    replace country="South Africa" if ccode==560	 	
	replace country= "Korea, Rep."  if ccode==732		
	replace country="South Sudan" if ccode==626		
	replace country="Spain" if ccode==230	  	
	replace country="Sri Lanka"  if ccode==780		
	replace country="St. Kitts & Nevis"  if ccode==60		
	replace country="St. Lucia" if ccode==56	 	
	replace country="St. Vincent & the Grenadines" if ccode==57	 	
	replace country="Sudan" if ccode==625		
	replace country="Suriname" if ccode==115	 	
  	  
    replace country="Swaziland" if ccode==572		
	replace country="Sweden" if ccode==380	 	
	replace country="Switzerland" if ccode==225		
	replace country="Syria" if ccode==652	 	
	replace country="Taiwan" if ccode==713	 	
	replace country="Tajikistan" if ccode==702		
	replace country="Tanzania" if ccode==510		
	replace country="Thailand" if ccode==800		
	replace country="Togo" if ccode==461	 	
	replace country="Tonga" if ccode==955		 	
  	  
    replace country="Trinidad & Tobago" if ccode==52	 	
	replace country="Tunisia" if ccode==616		
	replace country="Turkey" if ccode==640	  	
	replace country="Turkmenistan" if ccode==701	 	
	replace country="Tuscany" if ccode==337		
	replace country="Tuvalu" if ccode==947		
	replace country="Two Sicilies" if ccode==329	 	
	replace country="Uganda" if ccode==500	 	
	replace country="Ukraine" if ccode==369	 	
	replace country="UAE" if ccode==696		

    replace country="UK" if ccode==200		
	replace country="USA" if ccode==2	  	
	replace country="Uruguay" if ccode==165	 	
	replace country="Uzbekistan" if ccode==704		
	replace country="Vanuatu" if ccode==935		
	replace country="Venezuela" if ccode==101	
	replace country="Vietnam" if ccode==816	 	
	replace country="Yemen" if ccode==679	  	
	replace country="Zambia" if ccode==551	 	
	replace country="Zimbabwe" if ccode==552	 		
 
   

